<?php
/**
 * 应用程序的公共模型异常类
 *
 */
class Model_Exception extends QException
{
    /**
     * @var Array  $exception
     */
    public $exception = array(
                    'Ex001' => '无效的参数.', 
                    'Ex002' => '',
                    'Ex003' => '',
                    'Ex004' => '',
                    'Ex005' => '',
                    'Ex006' => '',
                    'Ex007' => '',
                    'Ex008' => '',
                    'Ex009' => '',
                    'Ex010' => '',
                    'Ex011' => ''
                    );
    /**
     * 构造函数
     */
    function __construct($message, $code)
    {
        if (array_key_exists($code, $this->exception)) {
            $message = $this->exception[$code];
        }
        parent::__construct($message);
    }

}
